﻿using System;
using UnityEngine;

namespace MrPP.SerriedCabinet
{
    public class Cell : MonoBehaviour
    {
       
        public void reset()
        {
           
        }
      
        public Location location;
        public Box.Type type {
            get {
                return location.location.type;
            }
            set {
                location.location.type = value;
            }


        }
        public int layer {
            get
            {
                return location.location.layer;
            }
            set
            {
                location.location.layer = value;
            }


        }

        public int box
        {
            get
            {
                return location.location.box;
            }
            set
            {
                location.location.box = value;
            }
        }
        public int sile
        {
            get
            {
                return location.location.sile;
            }
            set
            {
                location.location.sile = value;
            }
        }
        public void  Start() {
          //  this.doState(CellManager.Instance.type);
        }
        /*
       private void doState(CellManager.Type type)
       {

           _check.gameObject.SetActive(false);
           _hightlight.gameObject.SetActive(false);
           _shelve.gameObject.SetActive(false);
           if (type == CellManager.Type.Check)
           {
               _check.gameObject.SetActive(true);
               _check.refresh();
           }
           else if (type == CellManager.Type.Hlight)
           {
               _hightlight.gameObject.SetActive(true);
           }
           else if (type == CellManager.Type.Shelve)
           {
               _shelve.gameObject.SetActive(true);
           }
    }*/

        void OnDestroy() {
          //  if (CellManager.IsInitialized) {
           //     CellManager.Instance.onState -= doState;
         //   }
        }
        /*
        public void setHlight(bool enable)
        {
            _hightlight.gameObject.SetActive(enable);
        }
        public void setShelve(bool enable) {
            _shelve.gameObject.SetActive(enable);
        }
        public void setCheck(bool enable)
        {
            _check.gameObject.SetActive(enable);
        }
       */
    }
}